package pers.mine.po;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import pers.mine.vo.BaseExample;

public class OrderExample extends BaseExample {
	protected String orderByClause;

	protected boolean distinct;

	protected List<Criteria> oredCriteria;

	public OrderExample() {
		oredCriteria = new ArrayList<Criteria>();
	}

	public void setOrderByClause(String orderByClause) {
		this.orderByClause = orderByClause;
	}

	public String getOrderByClause() {
		return orderByClause;
	}

	public void setDistinct(boolean distinct) {
		this.distinct = distinct;
	}

	public boolean isDistinct() {
		return distinct;
	}

	public List<Criteria> getOredCriteria() {
		return oredCriteria;
	}

	public void or(Criteria criteria) {
		oredCriteria.add(criteria);
	}

	public Criteria or() {
		Criteria criteria = createCriteriaInternal();
		oredCriteria.add(criteria);
		return criteria;
	}

	public Criteria createCriteria() {
		Criteria criteria = createCriteriaInternal();
		if (oredCriteria.size() == 0) {
			oredCriteria.add(criteria);
		}
		return criteria;
	}

	protected Criteria createCriteriaInternal() {
		Criteria criteria = new Criteria();
		return criteria;
	}

	public void clear() {
		oredCriteria.clear();
		orderByClause = null;
		distinct = false;
	}

	protected abstract static class GeneratedCriteria {
		protected List<Criterion> criteria;

		protected GeneratedCriteria() {
			super();
			criteria = new ArrayList<Criterion>();
		}

		public boolean isValid() {
			return criteria.size() > 0;
		}

		public List<Criterion> getAllCriteria() {
			return criteria;
		}

		public List<Criterion> getCriteria() {
			return criteria;
		}

		protected void addCriterion(String condition) {
			if (condition == null) {
				throw new RuntimeException("Value for condition cannot be null");
			}
			criteria.add(new Criterion(condition));
		}

		protected void addCriterion(String condition, Object value,
				String property) {
			if (value == null) {
				throw new RuntimeException("Value for " + property
						+ " cannot be null");
			}
			criteria.add(new Criterion(condition, value));
		}

		protected void addCriterion(String condition, Object value1,
				Object value2, String property) {
			if (value1 == null || value2 == null) {
				throw new RuntimeException("Between values for " + property
						+ " cannot be null");
			}
			criteria.add(new Criterion(condition, value1, value2));
		}

		public Criteria andIdIsNull() {
			addCriterion("o_id is null");
			return (Criteria) this;
		}

		public Criteria andIdIsNotNull() {
			addCriterion("o_id is not null");
			return (Criteria) this;
		}

		public Criteria andIdEqualTo(Integer value) {
			addCriterion("o_id =", value, "id");
			return (Criteria) this;
		}

		public Criteria andIdNotEqualTo(Integer value) {
			addCriterion("o_id <>", value, "id");
			return (Criteria) this;
		}

		public Criteria andIdGreaterThan(Integer value) {
			addCriterion("o_id >", value, "id");
			return (Criteria) this;
		}

		public Criteria andIdGreaterThanOrEqualTo(Integer value) {
			addCriterion("o_id >=", value, "id");
			return (Criteria) this;
		}

		public Criteria andIdLessThan(Integer value) {
			addCriterion("o_id <", value, "id");
			return (Criteria) this;
		}

		public Criteria andIdLessThanOrEqualTo(Integer value) {
			addCriterion("o_id <=", value, "id");
			return (Criteria) this;
		}

		public Criteria andIdIn(List<Integer> values) {
			addCriterion("o_id in", values, "id");
			return (Criteria) this;
		}

		public Criteria andIdNotIn(List<Integer> values) {
			addCriterion("o_id not in", values, "id");
			return (Criteria) this;
		}

		public Criteria andIdBetween(Integer value1, Integer value2) {
			addCriterion("o_id between", value1, value2, "id");
			return (Criteria) this;
		}

		public Criteria andIdNotBetween(Integer value1, Integer value2) {
			addCriterion("o_id not between", value1, value2, "id");
			return (Criteria) this;
		}

		public Criteria andMidIsNull() {
			addCriterion("m_id is null");
			return (Criteria) this;
		}

		public Criteria andMidIsNotNull() {
			addCriterion("m_id is not null");
			return (Criteria) this;
		}

		public Criteria andMidEqualTo(Integer value) {
			addCriterion("m_id =", value, "mid");
			return (Criteria) this;
		}

		public Criteria andMidNotEqualTo(Integer value) {
			addCriterion("m_id <>", value, "mid");
			return (Criteria) this;
		}

		public Criteria andMidGreaterThan(Integer value) {
			addCriterion("m_id >", value, "mid");
			return (Criteria) this;
		}

		public Criteria andMidGreaterThanOrEqualTo(Integer value) {
			addCriterion("m_id >=", value, "mid");
			return (Criteria) this;
		}

		public Criteria andMidLessThan(Integer value) {
			addCriterion("m_id <", value, "mid");
			return (Criteria) this;
		}

		public Criteria andMidLessThanOrEqualTo(Integer value) {
			addCriterion("m_id <=", value, "mid");
			return (Criteria) this;
		}

		public Criteria andMidIn(List<Integer> values) {
			addCriterion("m_id in", values, "mid");
			return (Criteria) this;
		}

		public Criteria andMidNotIn(List<Integer> values) {
			addCriterion("m_id not in", values, "mid");
			return (Criteria) this;
		}

		public Criteria andMidBetween(Integer value1, Integer value2) {
			addCriterion("m_id between", value1, value2, "mid");
			return (Criteria) this;
		}

		public Criteria andMidNotBetween(Integer value1, Integer value2) {
			addCriterion("m_id not between", value1, value2, "mid");
			return (Criteria) this;
		}

		public Criteria andTelIsNull() {
			addCriterion("o_tel is null");
			return (Criteria) this;
		}

		public Criteria andTelIsNotNull() {
			addCriterion("o_tel is not null");
			return (Criteria) this;
		}

		public Criteria andTelEqualTo(String value) {
			addCriterion("o_tel =", value, "tel");
			return (Criteria) this;
		}

		public Criteria andTelNotEqualTo(String value) {
			addCriterion("o_tel <>", value, "tel");
			return (Criteria) this;
		}

		public Criteria andTelGreaterThan(String value) {
			addCriterion("o_tel >", value, "tel");
			return (Criteria) this;
		}

		public Criteria andTelGreaterThanOrEqualTo(String value) {
			addCriterion("o_tel >=", value, "tel");
			return (Criteria) this;
		}

		public Criteria andTelLessThan(String value) {
			addCriterion("o_tel <", value, "tel");
			return (Criteria) this;
		}

		public Criteria andTelLessThanOrEqualTo(String value) {
			addCriterion("o_tel <=", value, "tel");
			return (Criteria) this;
		}

		public Criteria andTelLike(String value) {
			addCriterion("o_tel like", value, "tel");
			return (Criteria) this;
		}

		public Criteria andTelNotLike(String value) {
			addCriterion("o_tel not like", value, "tel");
			return (Criteria) this;
		}

		public Criteria andTelIn(List<String> values) {
			addCriterion("o_tel in", values, "tel");
			return (Criteria) this;
		}

		public Criteria andTelNotIn(List<String> values) {
			addCriterion("o_tel not in", values, "tel");
			return (Criteria) this;
		}

		public Criteria andTelBetween(String value1, String value2) {
			addCriterion("o_tel between", value1, value2, "tel");
			return (Criteria) this;
		}

		public Criteria andTelNotBetween(String value1, String value2) {
			addCriterion("o_tel not between", value1, value2, "tel");
			return (Criteria) this;
		}

		public Criteria andAddressIsNull() {
			addCriterion("o_address is null");
			return (Criteria) this;
		}

		public Criteria andAddressIsNotNull() {
			addCriterion("o_address is not null");
			return (Criteria) this;
		}

		public Criteria andAddressEqualTo(String value) {
			addCriterion("o_address =", value, "address");
			return (Criteria) this;
		}

		public Criteria andAddressNotEqualTo(String value) {
			addCriterion("o_address <>", value, "address");
			return (Criteria) this;
		}

		public Criteria andAddressGreaterThan(String value) {
			addCriterion("o_address >", value, "address");
			return (Criteria) this;
		}

		public Criteria andAddressGreaterThanOrEqualTo(String value) {
			addCriterion("o_address >=", value, "address");
			return (Criteria) this;
		}

		public Criteria andAddressLessThan(String value) {
			addCriterion("o_address <", value, "address");
			return (Criteria) this;
		}

		public Criteria andAddressLessThanOrEqualTo(String value) {
			addCriterion("o_address <=", value, "address");
			return (Criteria) this;
		}

		public Criteria andAddressLike(String value) {
			addCriterion("o_address like", value, "address");
			return (Criteria) this;
		}

		public Criteria andAddressNotLike(String value) {
			addCriterion("o_address not like", value, "address");
			return (Criteria) this;
		}

		public Criteria andAddressIn(List<String> values) {
			addCriterion("o_address in", values, "address");
			return (Criteria) this;
		}

		public Criteria andAddressNotIn(List<String> values) {
			addCriterion("o_address not in", values, "address");
			return (Criteria) this;
		}

		public Criteria andAddressBetween(String value1, String value2) {
			addCriterion("o_address between", value1, value2, "address");
			return (Criteria) this;
		}

		public Criteria andAddressNotBetween(String value1, String value2) {
			addCriterion("o_address not between", value1, value2, "address");
			return (Criteria) this;
		}

		public Criteria andBuyTimeIsNull() {
			addCriterion("o_buyTime is null");
			return (Criteria) this;
		}

		public Criteria andBuyTimeIsNotNull() {
			addCriterion("o_buyTime is not null");
			return (Criteria) this;
		}

		public Criteria andBuyTimeEqualTo(Date value) {
			addCriterion("o_buyTime =", value, "buyTime");
			return (Criteria) this;
		}

		public Criteria andBuyTimeNotEqualTo(Date value) {
			addCriterion("o_buyTime <>", value, "buyTime");
			return (Criteria) this;
		}

		public Criteria andBuyTimeGreaterThan(Date value) {
			addCriterion("o_buyTime >", value, "buyTime");
			return (Criteria) this;
		}

		public Criteria andBuyTimeGreaterThanOrEqualTo(Date value) {
			addCriterion("o_buyTime >=", value, "buyTime");
			return (Criteria) this;
		}

		public Criteria andBuyTimeLessThan(Date value) {
			addCriterion("o_buyTime <", value, "buyTime");
			return (Criteria) this;
		}

		public Criteria andBuyTimeLessThanOrEqualTo(Date value) {
			addCriterion("o_buyTime <=", value, "buyTime");
			return (Criteria) this;
		}

		public Criteria andBuyTimeIn(List<Date> values) {
			addCriterion("o_buyTime in", values, "buyTime");
			return (Criteria) this;
		}

		public Criteria andBuyTimeNotIn(List<Date> values) {
			addCriterion("o_buyTime not in", values, "buyTime");
			return (Criteria) this;
		}

		public Criteria andBuyTimeBetween(Date value1, Date value2) {
			addCriterion("o_buyTime between", value1, value2, "buyTime");
			return (Criteria) this;
		}

		public Criteria andBuyTimeNotBetween(Date value1, Date value2) {
			addCriterion("o_buyTime not between", value1, value2, "buyTime");
			return (Criteria) this;
		}

		public Criteria andDescIsNull() {
			addCriterion("o_desc is null");
			return (Criteria) this;
		}

		public Criteria andDescIsNotNull() {
			addCriterion("o_desc is not null");
			return (Criteria) this;
		}

		public Criteria andDescEqualTo(String value) {
			addCriterion("o_desc =", value, "desc");
			return (Criteria) this;
		}

		public Criteria andDescNotEqualTo(String value) {
			addCriterion("o_desc <>", value, "desc");
			return (Criteria) this;
		}

		public Criteria andDescGreaterThan(String value) {
			addCriterion("o_desc >", value, "desc");
			return (Criteria) this;
		}

		public Criteria andDescGreaterThanOrEqualTo(String value) {
			addCriterion("o_desc >=", value, "desc");
			return (Criteria) this;
		}

		public Criteria andDescLessThan(String value) {
			addCriterion("o_desc <", value, "desc");
			return (Criteria) this;
		}

		public Criteria andDescLessThanOrEqualTo(String value) {
			addCriterion("o_desc <=", value, "desc");
			return (Criteria) this;
		}

		public Criteria andDescLike(String value) {
			addCriterion("o_desc like", value, "desc");
			return (Criteria) this;
		}

		public Criteria andDescNotLike(String value) {
			addCriterion("o_desc not like", value, "desc");
			return (Criteria) this;
		}

		public Criteria andDescIn(List<String> values) {
			addCriterion("o_desc in", values, "desc");
			return (Criteria) this;
		}

		public Criteria andDescNotIn(List<String> values) {
			addCriterion("o_desc not in", values, "desc");
			return (Criteria) this;
		}

		public Criteria andDescBetween(String value1, String value2) {
			addCriterion("o_desc between", value1, value2, "desc");
			return (Criteria) this;
		}

		public Criteria andDescNotBetween(String value1, String value2) {
			addCriterion("o_desc not between", value1, value2, "desc");
			return (Criteria) this;
		}

		public Criteria andSumIsNull() {
			addCriterion("o_sum is null");
			return (Criteria) this;
		}

		public Criteria andSumIsNotNull() {
			addCriterion("o_sum is not null");
			return (Criteria) this;
		}

		public Criteria andSumEqualTo(Integer value) {
			addCriterion("o_sum =", value, "sum");
			return (Criteria) this;
		}

		public Criteria andSumNotEqualTo(Integer value) {
			addCriterion("o_sum <>", value, "sum");
			return (Criteria) this;
		}

		public Criteria andSumGreaterThan(Integer value) {
			addCriterion("o_sum >", value, "sum");
			return (Criteria) this;
		}

		public Criteria andSumGreaterThanOrEqualTo(Integer value) {
			addCriterion("o_sum >=", value, "sum");
			return (Criteria) this;
		}

		public Criteria andSumLessThan(Integer value) {
			addCriterion("o_sum <", value, "sum");
			return (Criteria) this;
		}

		public Criteria andSumLessThanOrEqualTo(Integer value) {
			addCriterion("o_sum <=", value, "sum");
			return (Criteria) this;
		}

		public Criteria andSumIn(List<Integer> values) {
			addCriterion("o_sum in", values, "sum");
			return (Criteria) this;
		}

		public Criteria andSumNotIn(List<Integer> values) {
			addCriterion("o_sum not in", values, "sum");
			return (Criteria) this;
		}

		public Criteria andSumBetween(Integer value1, Integer value2) {
			addCriterion("o_sum between", value1, value2, "sum");
			return (Criteria) this;
		}

		public Criteria andSumNotBetween(Integer value1, Integer value2) {
			addCriterion("o_sum not between", value1, value2, "sum");
			return (Criteria) this;
		}

		public Criteria andCostIsNull() {
			addCriterion("o_cost is null");
			return (Criteria) this;
		}

		public Criteria andCostIsNotNull() {
			addCriterion("o_cost is not null");
			return (Criteria) this;
		}

		public Criteria andCostEqualTo(Double value) {
			addCriterion("o_cost =", value, "cost");
			return (Criteria) this;
		}

		public Criteria andCostNotEqualTo(Double value) {
			addCriterion("o_cost <>", value, "cost");
			return (Criteria) this;
		}

		public Criteria andCostGreaterThan(Double value) {
			addCriterion("o_cost >", value, "cost");
			return (Criteria) this;
		}

		public Criteria andCostGreaterThanOrEqualTo(Double value) {
			addCriterion("o_cost >=", value, "cost");
			return (Criteria) this;
		}

		public Criteria andCostLessThan(Double value) {
			addCriterion("o_cost <", value, "cost");
			return (Criteria) this;
		}

		public Criteria andCostLessThanOrEqualTo(Double value) {
			addCriterion("o_cost <=", value, "cost");
			return (Criteria) this;
		}

		public Criteria andCostIn(List<Double> values) {
			addCriterion("o_cost in", values, "cost");
			return (Criteria) this;
		}

		public Criteria andCostNotIn(List<Double> values) {
			addCriterion("o_cost not in", values, "cost");
			return (Criteria) this;
		}

		public Criteria andCostBetween(Double value1, Double value2) {
			addCriterion("o_cost between", value1, value2, "cost");
			return (Criteria) this;
		}

		public Criteria andCostNotBetween(Double value1, Double value2) {
			addCriterion("o_cost not between", value1, value2, "cost");
			return (Criteria) this;
		}

		public Criteria andStateIsNull() {
			addCriterion("o_state is null");
			return (Criteria) this;
		}

		public Criteria andStateIsNotNull() {
			addCriterion("o_state is not null");
			return (Criteria) this;
		}

		public Criteria andStateEqualTo(Integer value) {
			addCriterion("o_state =", value, "state");
			return (Criteria) this;
		}

		public Criteria andStateNotEqualTo(Integer value) {
			addCriterion("o_state <>", value, "state");
			return (Criteria) this;
		}

		public Criteria andStateGreaterThan(Integer value) {
			addCriterion("o_state >", value, "state");
			return (Criteria) this;
		}

		public Criteria andStateGreaterThanOrEqualTo(Integer value) {
			addCriterion("o_state >=", value, "state");
			return (Criteria) this;
		}

		public Criteria andStateLessThan(Integer value) {
			addCriterion("o_state <", value, "state");
			return (Criteria) this;
		}

		public Criteria andStateLessThanOrEqualTo(Integer value) {
			addCriterion("o_state <=", value, "state");
			return (Criteria) this;
		}

		public Criteria andStateIn(List<Integer> values) {
			addCriterion("o_state in", values, "state");
			return (Criteria) this;
		}

		public Criteria andStateNotIn(List<Integer> values) {
			addCriterion("o_state not in", values, "state");
			return (Criteria) this;
		}

		public Criteria andStateBetween(Integer value1, Integer value2) {
			addCriterion("o_state between", value1, value2, "state");
			return (Criteria) this;
		}

		public Criteria andStateNotBetween(Integer value1, Integer value2) {
			addCriterion("o_state not between", value1, value2, "state");
			return (Criteria) this;
		}
	}

	public static class Criteria extends GeneratedCriteria {

		protected Criteria() {
			super();
		}
	}

	public static class Criterion {
		private String condition;

		private Object value;

		private Object secondValue;

		private boolean noValue;

		private boolean singleValue;

		private boolean betweenValue;

		private boolean listValue;

		private String typeHandler;

		public String getCondition() {
			return condition;
		}

		public Object getValue() {
			return value;
		}

		public Object getSecondValue() {
			return secondValue;
		}

		public boolean isNoValue() {
			return noValue;
		}

		public boolean isSingleValue() {
			return singleValue;
		}

		public boolean isBetweenValue() {
			return betweenValue;
		}

		public boolean isListValue() {
			return listValue;
		}

		public String getTypeHandler() {
			return typeHandler;
		}

		protected Criterion(String condition) {
			super();
			this.condition = condition;
			this.typeHandler = null;
			this.noValue = true;
		}

		protected Criterion(String condition, Object value, String typeHandler) {
			super();
			this.condition = condition;
			this.value = value;
			this.typeHandler = typeHandler;
			if (value instanceof List<?>) {
				this.listValue = true;
			} else {
				this.singleValue = true;
			}
		}

		protected Criterion(String condition, Object value) {
			this(condition, value, null);
		}

		protected Criterion(String condition, Object value, Object secondValue,
				String typeHandler) {
			super();
			this.condition = condition;
			this.value = value;
			this.secondValue = secondValue;
			this.typeHandler = typeHandler;
			this.betweenValue = true;
		}

		protected Criterion(String condition, Object value, Object secondValue) {
			this(condition, value, secondValue, null);
		}
	}
}